Use attributes instead of element-type annotation
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 28 Apr 2020 12:24:06 +0000 (13:24 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 28 Apr 2020 12:31:29 +0000 (13:31 +0100)
The `element-type` annotation is for GList and GSList only, and turns
out adding support for GListModel in gobject-introspection breaks Vala
and the GIR for GIO.

Instead of using `element-type`, we can use the `attributes` annotation,
which is ignored by code generators based on the GIR data.

gtk/gtkwindow.c

index f35c1c00664cc945522fa8d5a9591c260272b29f..9319cce2ea3c66c74c9f402c39f60a5ee8659eb3 100644 (file)
@@ -2556,7 +2556,8 @@ gtk_window_get_modal (GtkWindow *window)
  * callbacks that might destroy the widgets or add new ones, be aware that
  * the list of toplevels will change and emit the "items-changed" signal.
  *
- * Returns: (element-type GtkWidget) (transfer none): the list of toplevel widgets
+ * Returns: (transfer none) (attributes element-type=GtkWindow): the list
+ *   of toplevel widgets
  */
 GListModel *
 gtk_window_get_toplevels (void)